function typePOLFn(classtype,checkValue,fromFlag){
    var listText="";
    var publicText=commonObj.POLPublicAtt;
    //var rightText="";
    for(var m in publicText){
        if(publicText[m].title=="备注说明"||publicText[m].title=="申请人及申请原因"){

            listText+="<li> <div class='listLeftTitle'><span>*</span>"+publicText[m].title+"：</div><div class='listLeftText'><textarea  rows='3' cols='20' style='height:40px;box-sizing: border-box;resize:none;margin-bottom: -10px; '/></div></li>"
        }else if(Array.prototype.isPrototypeOf(publicText[m].text)){
            if(fromFlag!=undefined&&fromFlag!=""){
                if(publicText[m].title=="料号生效产地"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData21(m);
                    function toLoadDingData21(m){
                        MaterialReverseAjax("/MaterialAttService/getPartNumberEffectiveSite","",function(str){
                            renderForm(str.data,m,"obj","","");
                        })
                    }
                }else if(publicText[m].title=="环保类别"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData91(m);
                    function toLoadDingData91(m){
                        MaterialReverseAjax("/MaterialAttService/getPartEnvProtectionCategory","",function(str){
                            renderForm(str.data,m,"Q/S0002+HF","","","Q/S0002+HF");
                        })
                    }
                }else if(publicText[m].title=="检验标准"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData81(m);
                    function toLoadDingData81(m){
                        MaterialReverseAjax("/MaterialAttService/getPartInspectionStandard","",function(str){
                            renderForm(str.data,m,"obj","","");
                        })
                    }
                }else{
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    renderForm(publicText[m].text,m,"","","","否");

                }
            }else{
                function renderForm2(str,m,selected){
                    layui.use('form', function(){
                        var form = layui.form;//高版本建议把括号去掉，有的低版本，需要加()
                        var option="";
                        var selt=selected!=undefined&&selected!=""?true:false;
                        for(var i=0;i<str.length;i++){
                            if(selt&&selected==str[i]){
                                option+='<option value="" selected>'+str[i]+'</option>'
                            }else{
                                option+='<option value="" >'+str[i]+'</option>'
                            }
                        }
                        listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option>'+option+' </select> </div> </div></form></div></li>';
                        form.render("select");
                    });
                }
                if(publicText[m].title=="料号生效产地"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData(m);
                    function toLoadDingData(m){
                        MaterialReverseAjax("/MaterialAttService/getPartNumberEffectiveSite","",function(str){
                            renderForm(str.data,m,"obj","","");
                        })
                    }
                }else if(publicText[m].title=="环保类别"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData9(m);
                    function toLoadDingData9(m){
                        MaterialReverseAjax("/MaterialAttService/getPartEnvProtectionCategory","",function(str){
                            renderForm(str.data,m,"Q/S0002+HF","","","Q/S0002+HF");
                        })
                    }
                }else if(publicText[m].title=="检验标准"){
                    listText+='<li><div class="listLeftTitle"><span>*</span>'+publicText[m].title+'：</div><div class="listLeftText"><form class="layui-form" action=""> <div class="layui-form-item proSelect"> <div class="layui-input-block editWidth"> <select lay-ignore style="display:block;" class="select'+m+'" name="" lay-verify=""> <option value=""></option> </select> </div> </div></form></div></li>';
                    toLoadDingData8(m);
                    function toLoadDingData8(m){
                        MaterialReverseAjax("/MaterialAttService/getPartInspectionStandard","",function(str){
                            renderForm(str.data,m,"obj","","");
                        })
                    }
                }else if(publicText[m].title=="源"){
                    renderForm2(publicText[m].text,m,"购买");
                }else if(publicText[m].title=="是否专显"){
                    renderForm2(publicText[m].text,m,"否");
                }else{
                    renderForm2(publicText[m].text,m);
                }

            }
        }else if(publicText[m].text==""){
            if(publicText[m].title=="尺寸(模组尺寸，例如：5.13、4.30等)"){
                listText+="<li> <div class='listLeftTitle'><span>*</span>"+publicText[m].title+"：</div><div class='listLeftText'><input  type='number' value=''/></div></li>"
            }else{
                listText+="<li> <div class='listLeftTitle'><span>*</span>"+publicText[m].title+"：</div><div class='listLeftText'><input  type='text' value=''/></div></li>"
            }
            }else if(publicText[m].text!=""){
            listText+="<li> <div class='listLeftTitle'><span>*</span>"+publicText[m].title+"：</div><div class='listLeftText'><input readonly type='text' value='"+publicText[m].text+"'/></div></li>"
        }
    }
    $(".list").append(listText);
    if(fromFlag!=undefined&&fromFlag!=""){
        var oLiLen=$(".list li");
        for(var i=0;i<oLiLen.length;i++){
            var input=$(".list li").eq(i).find("input");
            var select=$(".list li").eq(i).find("select");
            var textarea=$(".list li").eq(i).find("textarea");
            var getLocalStorage=localStorage.getItem("commonClassTypePOL")?localStorage.getItem("commonClassTypePOL"):"";
            textArr=getLocalStorage.split("&;")
            if(input!=undefined&&input.length>0){
                $(".list li").eq(i).find("input").val(textArr[i])
            }else if(select!=undefined&&select.length>0){
                $(".list li").eq(i).find("select option:selected").text(textArr[i])
            }else if(textarea!=undefined&&textarea.length>0){
                $(".list li").eq(i).find("textarea").val(textArr[i])
            }else{

            }
        }
    }
    /*listText+="<li> <div class='listLeftTitle'>创建CAD文档：</div><div class='listLeftText'><input  type='checkbox' value=''/></div></li>";
     listText+="<li> <div class='listLeftTitle'>检入后保持检出状态：</div><div class='listLeftText'><input  type='checkbox' value=''/></div></li>";*/

    /*$(".list li:nth-child(2) span").css({
        display: "none"
    })*/
    $(".list li:nth-child(7) span").css({
        display: "none"
    })
    $(".list li:nth-child(10) span").css({
        display: "none"
    });
    //$(".rightList").append(rightText);
    var textArrLen=[];
    for(var x=0;x<$(".rightList li").length;x++){
        var textArea =$(".rightList li").eq(x).attr("class");
        if(textArea=="textAreaList"){
            textArrLen.push(x);
        }
    }
    if(textArrLen.length>0){
        for(var w=0;w<textArrLen.length;w++){
            $(".list li").eq(textArrLen[w]).css({
                "height":"40px",
                "line-height":"40px"
            })
        }
    }
    $(".list li:nth-last-child(1) input").on("change",function(){
        var vals=$(this).val();
        var isE=vals.split("e");//length>0,!="";
        var isPoint=vals.split(".");
        if(isE.length==1&&isE[0]==""){
            return;
        }
        if(isPoint.length==1&&isPoint[0]!=""){
            $(this).val(vals+".00")
        }else if(isPoint.length>1){
            if(isPoint[1].length<2){
                $(this).val(vals+"0")
            }else if(isPoint[1].length==2){
                $(this).val(vals)
            }else{
                /*var last=isPoint[1].slice(0,2);
                $(this).val(isPoint[0]+"."+last);*/
                layerFn("尺寸格式不正确,小数点后应保留两位数字")
                $(this).val("")
            }
        }

    })
    $(".typePOLClick").unbind().click(function(){
        var oLiLen=$(".list li");
        var textArr=[];
        var mesg="";
       /* var lastLen=$(".list li:nth-last-child(1) input").val().split(".")[1].length;
        if(lastLen!=2){
            layerFn("尺寸格式不正确，小数点后应保留两位数字");
            return;
        }*/
        for(var i=0;i<oLiLen.length;i++){
            var input=$(".list li").eq(i).find("input");
            var select=$(".list li").eq(i).find("select");
            var textarea=$(".list li").eq(i).find("textarea");
            if((i==6)&&$(input).val()==""){
                textArr.push("")
            }
                if($(".list li").eq(i).find("textarea").val()==""&&i==9){
                    textArr.push("")
                }
            if (input != undefined && input.length>0 && $(".list li").eq(i).find("input").val() != "") {
                textArr.push($(".list li").eq(i).find("input").val())
            } else if (select != undefined && select.length>0  && $(".list li").eq(i).find("select option:selected").text() != "") {
                textArr.push($(".list li").eq(i).find("select option:selected").text())
            } else if (textarea != undefined && textarea.length>0  && $(".list li").eq(i).find("textarea").val()!="") {

                    textArr.push($(".list li").eq(i).find("textarea").val())

            }else{

               if(i!=6&&i!=9){
                   switch (i){
                       case 0:
                           mesg+="环保类别,";
                           break;
                       case 1:
                           mesg+="产品型号,";
                           break;
                       case 2:
                           mesg+="料号生效产地,";
                           break;
                       case 3:
                           mesg+="检验标准,";
                           break;
                       case 4:
                           mesg+="供应商,";
                           break;
                       case 5:
                           mesg+="物料分级,";
                           break;
                       case 7:
                           mesg+="是否专显,";
                           break;
                       case 8:
                           mesg+="申请人及申请原因,";
                           break;
                       case 10:
                           mesg+="尺寸(模组尺寸，例如：5.13、4.30等),";
                           break;

                   }
               }
            }



        }
        if(mesg!=""){
            layerFn("请将"+mesg+"填写完整");
            textArr=[];
            return ;
        }
        if(textArr.length>0){
            var getStatus=$(".bottomCheckBox div input");
            for(var m=0;m< getStatus.length>0;m++){
                if($(".bottomCheckBox div input").eq(m).prop('checked')){
                    textArr.push("是");
                }else{
                    textArr.push("否")
                }
            }
            var nameArr=[];
            var checkLen=$(".checkText input");
            for(var i=0;i<checkLen.length;i++){
                var checked=$(".checkText input").eq(i).prop('checked');
                if(checked){
                    nameArr.push($(".checkText input").eq(i).next().text())
                }
            }
            var textArea="";
            for(var s=0;s<textArr.length;s++){
                if(s!=(textArr.length-1)){
                    textArea+=textArr[s]+"&;";
                }else{{
                    textArea+=textArr[s];
                }}

            }
            var checkVal=classtype;
            localStorage.setItem("commonClassTypePOL",textArea);
            if(fromFlag!=undefined&&fromFlag!=""){
                window.location.href="about:blank";
                window.opener=null;
                window.open('','_self');
                window.close();
            }else{
                if(nameArr.length==0||nameArr.length<3){
                    layerFn("原材料批量申请类型必须全选");
                    return;
                }
                if(checkVal=="POL"){
                    window.open("mateApply.html?nameArr="+nameArr+"&checkVal="+checkVal);
                    window.location.href="about:blank";
                    window.opener=null;
                    window.open('','_self');
                    window.close();
                }
            }
        }

    })
}